from collections import defaultdict
import os

br_mongo_conf = {
    "host": ","
            "",
    "user": "",
    "password": ""
}

br_mysql_conf = {
    "URI": "",
    "user": "",
    "password": ""
}

br_redis_conf = [
    {"host": "", "port": ""},
    {"host": "", "port": ""}
]

# 获取项目根目录
base_url = os.path.dirname(os.path.abspath(__file__))

SALT = ""


# 设置键值不存在时返回text/plain
def default_value():
    return "text/plain"


CONTENT_TYPE = defaultdict(default_value)
CONTENT_TYPE["FORM"] = "application/x-www-form-urlencoded"
CONTENT_TYPE["JSON"] = "application/json"

# 服务器相关
SSO = ""

MOZI = defaultdict(str)
MOZI["test"] = "https://"
MOZI["staging"] = "https://"
MOZI["prod"] = "https://"

GUIGUZI = defaultdict(str)
GUIGUZI["test"] = "https://"
GUIGUZI["staging"] = "https://"
GUIGUZI["prod"] = "https://"

# sso账号密码
sso_user = ""
sso_pwd = ""

# 日志相关设置
log = {
    "filename": "project.log",  # 保存的文件
    "write_level": "debug",  # 写入文件等级
    "console_level": "debug",  # 控制台输出等级
}

STAG = "test"
